file=open("D:\\hello.txt","a")
ip=input("请输入一段文字：")
file.write(ip)
file.close()